<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"
      xmlns:f="http://xmlns.jcp.org/jsf/core">
    <h:head>
        <title>MeteoCal</title>
        <h:outputStylesheet name="css/jsfcrud.css"/>
        <style>
            #nerdStuff{
                float: left;
                position: absolute;
                bottom: 0px;
                right: 0px;
                background-color: white;
                padding: 5px;
                border-style: solid;
                border-width: 1px;
            }
            #login{
                text-align: center;
                float: left;
                border: 1px black;
                border-style: solid;
                border-radius: 5px;
                padding: 5px;
                background: white;
                position: absolute;
                left: 35%;
                right: 35%;
                top: 50%;
            }
            h1{
                text-align: center;
                position: absolute;
                top: 10%;
                font-size: 700%;
                width: 99%;
            }
            table{
                margin:5px;
                width: 100%;
            }
            input[type=button]{
                margin-top: 5px;
            }
            </style>
    </h:head>
    <h:body>

        <h1>MeteoCal</h1>
    <div id="nerdStuff">
        Administrator Options
        <br />
        <h:link outcome="/views/events/List" value="Show All Events Items"/>
        <br />
        <h:link outcome="/views/users/List" value="Show All Users Items"/>
        <br />
        <h:link outcome="/views/invitations/List" value="Show All Invitations Items"/>
        <br />
        <h:link outcome="/views/participants/List" value="Show All Participants Items"/>
    </div>


    <div id="login">

        <h:form>
            ${usersController.logout()}
            If you are already registered, please log in:
            <h:panelGrid columns="2">   
                <h:outputLabel value="#{bundle.CreateUsersLabel_username}" for="username" />
                <h:inputText id="usernameLog" value="#{usersController.selected.username}" title="#{bundle.CreateUsersTitle_username}" required="true" requiredMessage="#{bundle.CreateUsersRequiredMessage_username}"/>
                <h:outputLabel value="#{bundle.CreateUsersLabel_password}" for="password" />
                <h:inputSecret id="passwordLog" value="#{usersController.selected.password}" title="#{bundle.CreateUsersTitle_password}" required="true" requiredMessage="#{bundle.CreateUsersRequiredMessage_password}"/>
            </h:panelGrid>
            <h:commandButton action="#{usersController.login()}" value="#{bundle.LoginUsersSaveLink}">
                <f:param name="username" value="#{usersController.username}"/>
            </h:commandButton>
            <br />
            <br />
            Or if you are not, it's time to register yourself!
            <br />
            <br />
            <h:button outcome="/views/users/Create.xhtml" value="Go to registration!" />
            <br />
        </h:form>
        <br />

    </div>

    </h:body>


</html>

